// 统一数据返回类
const { DataReturn } = require('../../../common/returnclass');

module.exports = (req, res) => {
	req.session.destroy(err => {
			if (err == null) {
				res.clearCookie('connect-sid');
				DataReturn.getData(res,200,[], '退出成功')
			}else {
				DataReturn.getData(res,400,[], '退出失败')
			}
		});
}